const seq = require('sequelize')
const time = require('../time')

module.exports = {
  NAME: 'sys_user',
  TABLE: {
    user_id: {
      type: seq.INTEGER(11),
      primaryKey: true,
      unique: true,
      autoIncrement: true,
      comment: 'user_id 主键，自增',
      field: 'user_id' //  相应的字段名称
    },
    realname: {
      type: seq.STRING(64),
      comment: '真实姓名',
      field: 'realname'
    },
    username: {
      type: seq.STRING(64),
      comment: '用户名',
      field: 'username' //  相应的字段名称
    },
    password: {
      type: seq.STRING(255),
      comment: '密码',
      field: 'password'
    },
    phone: {
      type: seq.STRING(20),
      comment: '手机号',
      field: 'phone'
    },
    dept_id: {
      type: seq.INTEGER(11),
      comment: '部门ID',
      field: 'dept_id'
    },
    del_flag: {
      type: seq.CHAR(1),
      defaultValue: '0',
      comment: '0-正常，1-删除',
      field: 'del_flag'
    },
    ...time.create_date,
    ...time.upadte_date
  }
}
